<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />


<meta name="author" content="Yiying Wang" />

<meta name="date" content="2017-03-15" />

<title>Widget 03 - Grid</title>

<script src="libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="libs/navigation-1.1/tabsets.js"></script>
<script src="libs/htmlwidgets-0.8/htmlwidgets.js"></script>
<script src="libs/echarts-2.2.7/echarts-all.js"></script>
<script src="libs/charts-ext-2.2.7/main.js"></script>
<script src="libs/charts-ext-2.2.7/BMap.js"></script>
<script src="libs/echarts-binding-0.2/echarts.js"></script>


<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>


<style type="text/css">
h1 {
  font-size: 34px;
}
h1.title {
  font-size: 38px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 24px;
}
h4 {
  font-size: 18px;
}
h5 {
  font-size: 16px;
}
h6 {
  font-size: 12px;
}
.table th:not([align]) {
  text-align: left;
}
</style>

<link rel="stylesheet" href="/home/madlogos/R/x86_64-pc-linux-gnu-library/3.3/knitr/misc/vignette.css" type="text/css" />

</head>

<body>

<style type = "text/css">
.main-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
code {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.04);
}
img {
  max-width:100%;
  height: auto;
}
.tabbed-pane {
  padding-top: 12px;
}
button.code-folding-btn:focus {
  outline: none;
}
</style>



<div class="container-fluid main-container">

<!-- tabsets -->
<script>
$(document).ready(function () {
  window.buildTabsets("TOC");
});
</script>

<!-- code folding -->






<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Widget 03 - Grid</h1>
<h4 class="author"><em>Yiying Wang</em></h4>
<h4 class="date"><em>2017-03-15</em></h4>

</div>

<div id="TOC">
<ul>
<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a></li>
<li><a href="#function-call"><span class="toc-section-number">2</span> Function Call</a></li>
<li><a href="#showcase"><span class="toc-section-number">3</span> Showcase</a><ul>
<li><a href="#data-preparation"><span class="toc-section-number">3.1</span> Data Preparation</a></li>
<li><a href="#modification"><span class="toc-section-number">3.2</span> Modification</a></li>
</ul></li>
<li><a href="#references"><span class="toc-section-number">4</span> References</a></li>
</ul>
</div>

<p>First, you should load <code>recharts</code>:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(recharts)</code></pre></div>
<div id="introduction" class="section level1">
<h1><span class="header-section-number">1</span> Introduction</h1>
<p><code>setGrid</code> is used to set the pane grid when the chart is based on Cartesian Coordinate System (but may also take effect in other charts).</p>
<p><code>setGrid</code> family has two types of functions: setting grid and relocating widgets. The key is four parameters: x, y, x2, y2. The point (x, y) is the upper-left point of the widget/pane, while the point (x2, y2) is the lower-right point of the widgt/pane.</p>
<p>As every call of recharts functions automatically resizes the widgets, you are recommanded to put <code>setGrid</code> at the end of a pipe chain call.</p>
</div>
<div id="function-call" class="section level1">
<h1><span class="header-section-number">2</span> Function Call</h1>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">setGrid</span>(chart, <span class="dt">x =</span> <span class="dv">80</span>, <span class="dt">y =</span> <span class="dv">60</span>, <span class="dt">x2 =</span> <span class="dv">80</span>, <span class="dt">y2 =</span> <span class="dv">60</span>, <span class="dt">width =</span> <span class="ot">NULL</span>,
  <span class="dt">height =</span> <span class="ot">NULL</span>, <span class="dt">bgColor =</span> <span class="ot">NULL</span>, <span class="dt">borderColor =</span> <span class="ot">NULL</span>, <span class="dt">borderWidth =</span> <span class="dv">1</span>,
  <span class="dt">widget =</span> <span class="kw">c</span>(<span class="st">&quot;pane&quot;</span>, <span class="st">&quot;timeline&quot;</span>, <span class="st">&quot;legend&quot;</span>, <span class="st">&quot;title&quot;</span>, <span class="st">&quot;dataZoom&quot;</span>, <span class="st">&quot;dataRange&quot;</span>,
  <span class="st">&quot;toolbox&quot;</span>, <span class="st">&quot;roamController&quot;</span>), ...)

<span class="kw">relocTitle</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, ...)

<span class="kw">relocLegend</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, ...)

<span class="kw">relocDataZoom</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, ...)

<span class="kw">relocDataRange</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, ...)

<span class="kw">relocTimeline</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, <span class="dt">x2 =</span> <span class="ot">NULL</span>, <span class="dt">y2 =</span> <span class="ot">NULL</span>, ...)

<span class="kw">relocToolbox</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, ...)

<span class="kw">relocRoam</span>(chart, <span class="dt">x =</span> <span class="ot">NULL</span>, <span class="dt">y =</span> <span class="ot">NULL</span>, ...)</code></pre></div>
<table>
<colgroup>
<col width="17%" />
<col width="82%" />
</colgroup>
<thead>
<tr class="header">
<th>Arg</th>
<th>Requirement</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>chart</strong></p></td>
<td><p>Echarts object generated by <code>echartR</code> or <code>echart</code>.</p></td>
</tr>
<tr class="even">
<td><p>x</p></td>
<td><p>x coordinate of the left upper point of the plot area. Default 80px.</p></td>
</tr>
<tr class="odd">
<td><p>y</p></td>
<td><p>y coordinate of the left upper point of the plot area. Default 60px.</p></td>
</tr>
<tr class="even">
<td><p>x2</p></td>
<td><p>x coordinate of the right lower point of the plot area. Default 80px.</p></td>
</tr>
<tr class="odd">
<td><p>y2</p></td>
<td><p>y coordinate of the right lower point of the plot area. Default 60px.</p></td>
</tr>
<tr class="even">
<td><p>width</p></td>
<td><p>Width of the plot area. Default NULL (automatically configured).</p></td>
</tr>
<tr class="odd">
<td><p>height</p></td>
<td><p>Height of the plot area. Default NULL (automatically configured).</p></td>
</tr>
<tr class="even">
<td><p>bgColor</p></td>
<td><p>background color of plot area. Default transparent (‘rgba(0,0,0,0)’).</p></td>
</tr>
<tr class="odd">
<td><p>borderColor</p></td>
<td><p>border color of the plot area. Default ‘#ccc’.</p></td>
</tr>
<tr class="even">
<td><p>borderWidth</p></td>
<td><p>border width of the plot area. Default 0px (not shown).</p></td>
</tr>
<tr class="odd">
<td><p>widget</p></td>
<td><p>Widget name to set. Could be c(‘pane’, ‘timeline’, ‘legend’, ‘title’, ‘dataZoom’, ‘dataRange’, ‘toolbox’, ‘roamController’).</p>
<ul>
<li><strong>pane</strong>: the area pane, takes in all the parameters</li>
<li><strong>timeline</strong>: timeline widget, only use x, y, x2, y2</li>
<li><strong>legend, title, dataZoom, dataRange, toolbox, roamController</strong>: other widgets, only use x, y</li>
</ul></td>
</tr>
<tr class="even">
<td><p>…</p></td>
<td><p>Elipsis.</p></td>
</tr>
</tbody>
</table>
</div>
<div id="showcase" class="section level1">
<h1><span class="header-section-number">3</span> Showcase</h1>
<div id="data-preparation" class="section level2">
<h2><span class="header-section-number">3.1</span> Data Preparation</h2>
<p>Let’s use <code>airquality</code> to generate an Echarts objects <code>g</code>:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(data.table)
aq1 &lt;-<span class="st"> </span><span class="kw">melt</span>(airquality, <span class="dt">id=</span><span class="kw">c</span>(<span class="st">&#39;Month&#39;</span>, <span class="st">&#39;Day&#39;</span>), <span class="dt">measure=</span><span class="kw">c</span>(<span class="st">&#39;Temp&#39;</span>, <span class="st">&#39;Wind&#39;</span>), 
            <span class="dt">variable=</span><span class="st">&#39;Param&#39;</span>)
g &lt;-<span class="st"> </span><span class="kw">echartr</span>(aq1, Day, value, Param, <span class="dt">t=</span>Month, <span class="dt">type=</span><span class="st">&#39;curve&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setToolbox</span>(<span class="dt">pos=</span><span class="dv">3</span>) %&gt;%<span class="st"> </span><span class="kw">setTitle</span>(<span class="st">&#39;Temp &amp; Wind&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setDataZoom</span>() %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setDataRange</span>()
g</code></pre></div>
<div id="htmlwidget-3e8fe06ce2e0a98d2aee" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-3e8fe06ce2e0a98d2aee">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":90,"x2":80,"y2":50},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"title":{"text":"Temp & Wind (Month: 5)","x":"center","y":"bottom","orient":"horizontal"},"grid":{"x":90,"y2":160},"dataZoom":{"show":true,"orient":"horizontal","height":30,"y2":100,"y":820,"x":90},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#1e90ff","#f0ffff"],"borderColor":"#ccc","borderWidth":0,"min":1,"max":97}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 6)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 7)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 8)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 9)","x":"center","y":"bottom","orient":"horizontal"}}]},"evals":["options.0.tooltip.formatter"],"jsHooks":[]}</script>
</div>
<div id="modification" class="section level2">
<h2><span class="header-section-number">3.2</span> Modification</h2>
<p><code>width</code> and <code>height</code> in <code>setGrid</code> are different from those in <code>setTheme</code>. <code>setGrid</code> only takes effect in the pane.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g %&gt;%<span class="st"> </span><span class="kw">setGrid</span>(<span class="dt">width=</span><span class="dv">300</span>, <span class="dt">height=</span><span class="dv">200</span>)</code></pre></div>
<div id="htmlwidget-790d9deb08ca95011c8c" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-790d9deb08ca95011c8c">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":90,"x2":80,"y2":50},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"title":{"text":"Temp & Wind (Month: 5)","x":"center","y":"bottom","orient":"horizontal"},"grid":{"x":90,"y2":160,"width":300,"height":200},"dataZoom":{"show":true,"orient":"horizontal","height":30,"y2":100,"y":820,"x":90},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#1e90ff","#f0ffff"],"borderColor":"#ccc","borderWidth":0,"min":1,"max":97}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 6)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 7)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 8)","x":"center","y":"bottom","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 9)","x":"center","y":"bottom","orient":"horizontal"}}]},"evals":["options.0.tooltip.formatter"],"jsHooks":[]}</script>
<p>We want to enlarge the grid a little bit. So we need to relocate some of the widgets and finally change the grid using <code>setGrid</code>.</p>
<p>Then relocate the widgets accordingly. The easiest way to relocate the widget is using <code>pos</code> argument in <code>set[Widgets]</code> function.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g1 &lt;-<span class="st"> </span>g %&gt;%<span class="st"> </span><span class="kw">setTitle</span>(<span class="dt">pos=</span><span class="dv">12</span>)
g1</code></pre></div>
<div id="htmlwidget-5fda33a307ef8e9b0b86" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-5fda33a307ef8e9b0b86">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":90,"x2":80,"y2":50},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"title":{"text":"Temp & Wind (Month: 5)","x":"center","y":"top","orient":"horizontal"},"grid":{"x":90,"y2":160},"dataZoom":{"show":true,"orient":"horizontal","height":30,"y2":100,"y":820,"x":90},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#1e90ff","#f0ffff"],"borderColor":"#ccc","borderWidth":0,"min":1,"max":97}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 6)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 7)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 8)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 9)","x":"center","y":"top","orient":"horizontal"}}]},"evals":["options.0.tooltip.formatter"],"jsHooks":[]}</script>
<p>Now we can push timeline and dataZoom down to the bottom. Since dataRange only supports x and y, what if we want to put it in the bottom and stick to y2? The Echarts object has already been assigned a randomized <code>elementId</code> as metadata. We can use a JavaScript expression <code>document.getElementById(&lt;elementId&gt;).offsetHeight</code> to refer to the canvas height in a dynamic manner. No matter how we resize the canvas window, the widget will be always at the correct position.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g2 &lt;-<span class="st"> </span>g1
g2$elementId &lt;-<span class="st"> &quot;chart2&quot;</span>
g2 &lt;-<span class="st"> </span>g2 %&gt;%<span class="st"> </span><span class="kw">relocDataZoom</span>(<span class="dt">x=</span><span class="dv">120</span>, <span class="dt">y=</span><span class="kw">JS</span>(<span class="kw">paste0</span>(
    <span class="st">&quot;document.getElementById(&#39;&quot;</span>, g2$elementId, <span class="st">&quot;&#39;).offsetHeight-30&quot;</span>)))
g2</code></pre></div>
<div id="chart2" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="chart2">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":90,"x2":80,"y2":50},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"title":{"text":"Temp & Wind (Month: 5)","x":"center","y":"top","orient":"horizontal"},"grid":{"x":90,"y2":160},"dataZoom":{"show":true,"orient":"horizontal","height":30,"y2":100,"y":"document.getElementById('chart2').offsetHeight-30","x":120},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#1e90ff","#f0ffff"],"borderColor":"#ccc","borderWidth":0,"min":1,"max":97}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 6)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 7)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 8)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 9)","x":"center","y":"top","orient":"horizontal"}}]},"evals":["options.0.tooltip.formatter","options.0.dataZoom.y"],"jsHooks":[]}</script>
<p><code>timeline</code> supports x2 and y2. So we can directly set its y2 25. Thus, we exchaned the position of timeline and dataZoom.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g3 &lt;-<span class="st"> </span>g2 %&gt;%<span class="st"> </span><span class="kw">relocTimeline</span>(<span class="dt">y2=</span><span class="dv">25</span>, <span class="dt">x=</span><span class="dv">120</span>, <span class="dt">x2=</span><span class="dv">50</span>)
g3$elementId &lt;-<span class="st"> &quot;chart3&quot;</span>
g3</code></pre></div>
<div id="chart3" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="chart3">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":120,"x2":50,"y2":25},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"title":{"text":"Temp & Wind (Month: 5)","x":"center","y":"top","orient":"horizontal"},"grid":{"x":90,"y2":160},"dataZoom":{"show":true,"orient":"horizontal","height":30,"y2":100,"y":"document.getElementById('chart2').offsetHeight-30","x":120},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#1e90ff","#f0ffff"],"borderColor":"#ccc","borderWidth":0,"min":1,"max":97}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 6)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 7)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 8)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 9)","x":"center","y":"top","orient":"horizontal"}}]},"evals":["options.0.tooltip.formatter","options.0.dataZoom.y"],"jsHooks":[]}</script>
<p>Finally let’s enlarge the pane grid.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g4 &lt;-<span class="st"> </span>g3 %&gt;%<span class="st"> </span><span class="kw">setGrid</span>(<span class="dt">x=</span><span class="dv">120</span>, <span class="dt">y=</span><span class="dv">40</span>, <span class="dt">x2=</span><span class="dv">50</span>, <span class="dt">y2=</span><span class="dv">90</span>)
g4$elementId &lt;-<span class="st"> &quot;chart4&quot;</span>
g4</code></pre></div>
<div id="chart4" style="width:672px;height:480px;" class="echarts html-widget"></div>
<script type="application/json" data-for="chart4">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":120,"x2":50,"y2":25},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"title":{"text":"Temp & Wind (Month: 5)","x":"center","y":"top","orient":"horizontal"},"grid":{"x":120,"y2":90,"y":40,"x2":50},"dataZoom":{"show":true,"orient":"horizontal","height":30,"y2":100,"y":"document.getElementById('chart2').offsetHeight-30","x":120},"dataRange":{"show":true,"calculable":false,"itemWidth":6,"selectedMode":true,"x":"left","y":"bottom","orient":"vertical","color":["#1e90ff","#f0ffff"],"borderColor":"#ccc","borderWidth":0,"min":1,"max":97}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 6)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 7)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 8)","x":"center","y":"top","orient":"horizontal"}},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}],"title":{"text":"Temp & Wind (Month: 9)","x":"center","y":"top","orient":"horizontal"}}]},"evals":["options.0.tooltip.formatter","options.0.dataZoom.y"],"jsHooks":[]}</script>
</div>
</div>
<div id="references" class="section level1">
<h1><span class="header-section-number">4</span> References</h1>
<p><a href="http://echarts.baidu.com/echarts2/doc/option.html#title~grid" class="uri">http://echarts.baidu.com/echarts2/doc/option.html#title~grid</a></p>
</div>

<script type="text/javascript">
window.onload = function() {
  var i, fig = 1, caps = document.getElementsByClassName('caption');
  for (i = 0; i < caps.length; i++) {
    var cap = caps[i];
    if (cap.parentElement.className !== 'figure' || cap.nodeName !== 'P')
      continue;
    cap.innerHTML = '<span>Figure ' + fig + ':</span> ' + cap.innerHTML;
    fig++;
  }
  fig = 1;
  caps = document.getElementsByTagName('caption');
  for (i = 0; i < caps.length; i++) {
    var cap = caps[i];
    if (cap.parentElement.nodeName !== 'TABLE') continue;
    cap.innerHTML = '<span>Table ' + fig + ':</span> ' + cap.innerHTML;
    fig++;
  }
}
</script>



</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>
